package com.learn.micro_mall.service.convertor.goods;

import com.learn.micro_mall.domain.entity.category.CategoryEntity;
import com.learn.micro_mall.domain.entity.goods.GoodsSkuParamEntity;
import com.learn.micro_mall.service.request.category.CategoryCreateRequest;
import com.learn.micro_mall.service.request.category.CategoryUpdateRequest;
import com.learn.micro_mall.service.request.goods.GoodsSkuParamCreateRequest;
import com.learn.micro_mall.service.request.goods.GoodsSkuParamUpdateRequest;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

@Mapper
public interface GoodsSkuParamMapper {

    /**
     * 获取该类自动生成的实现类的实例
     * 接口中的属性都是 public static final 的 方法都是public abstract的
     */
    GoodsSkuParamMapper INSTANCES = Mappers.getMapper(GoodsSkuParamMapper.class);


//    @Mappings({
//            @Mapping(source = "id", target = "userId"),
//            @Mapping(source = "username", target = "name"),
//            @Mapping(source = "role.roleName", target = "roleName")
//    })
    GoodsSkuParamEntity toGoodsSkuParamEntity(GoodsSkuParamCreateRequest request);

    GoodsSkuParamEntity toGoodsSkuParamEntity(GoodsSkuParamUpdateRequest request);

}
